<!DOCTYPE html>
<html>
<head>
	<title>新增/修改请求</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/min.css" />
	<link rel="stylesheet" href="__PUBLIC__/Admin/content/style.css" />

	<!-- jQuery AND jQueryUI -->
	<script type="text/javascript" src="__PUBLIC__/Admin/js/libs/jquery/1.6/jquery.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/Admin/js/libs/jqueryui/1.8.13/jquery-ui.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/Admin/js/min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/Admin/content/main.js"></script>
</head>
<body>
<!-- CONTENT -->
<div id="content" class="white">

  <div class="bloc">
    <div class="title">
		<?php
			if(I('get.id')){
				echo '编辑';
			}else{
				echo '新增';
			}
		?>请求
	</div>
    <form method="post" action="setfieldOperation">
		<?php
			$id = I('get.id');
			$workflowid = I('get.workflowid');
			if($id){
				echo "<input type='hidden' name='id' value='".$id."'/>";
			}
		?>
    	<input name="workflowid" type="hidden" value="{$workflowid}"/>
    <div class="content">
      <div class="input">
		<table id='t2'>
			  <tr>
				<th>数据库表名</th>
				<th></th>
				<th>显示名</th>
				<th></th>
				<th align="right">读写</th>
			  </tr>
		  <volist name='fieldlist' id='vo'>
			  <tr>
				<td>
					<center>
						<span>{$vo.dbname}</span>
						<input name="dbname[]" type="hidden" readonly='readonly'value="{$vo.dbname}" />
						<input name="fieldid[]" type="hidden" readonly='readonly'value="{$vo.id}" />
						<input name="formfieldid[]" type="hidden" readonly='readonly'value="{$vo.dbname}" />
					</center>
				<td/>
				<td>
					<center>
						<span>{$vo.fieldname}</span>
						<input name="fieldname[]" type="hidden" value="{$vo.fieldname}"/>
					</center>
				<td/>
				<td>
					<center>
						<select name="readwrite[]">
							<?php
								$flag = 0;	//判断读写标志位 0只读,1可写
						?>
							<volist name='nodefieldlist' id='vo2'>
								<?php
									if($vo[id]==$vo2[formfieldid]){
									if($vo2[readwrite]==0){
										$flag = 0;
										break;
									}else if($vo2[readwrite]==1){
										$flag = 1;
										break;
									}else if($vo2[readwrite]==2){
										$flag = 2;
										break;
									}
								}
							?>
							</volist>
							<?php
								echo '<option value=0 '; if($flag==0){ echo 'selected=selected';	} echo '>只读</option>';
								echo '<option value=1 '; if($flag==1){ echo 'selected=selected';	} echo '>编辑</option>';
								echo '<option value=2 '; if($flag==2){ echo 'selected=selected';	} echo '>隐藏</option>';
							?>
						</select>
					</center>
				<td/>
			  </tr>
		  </volist>
		<table/>
      </div>
      <div class="submit"><input style='float:left' value='保存' type="submit" class='black'/>
      </div>
    </div>
    </form>
  </div>
</div>
<script>
	function pushCommit(method){
		alert(method);
	}
</script>
</body>
</html>